home *** CD-ROM | disk | FTP | other *** search
/ QuickTime 2.0 Developer Kit / QuickTime 2.0 Developer Kit.iso / mac / MAC / Programming Stuff / Interfaces / PInterfaces / IntEnv.p < prev    next >
Encoding:
Text File  |  1994-10-20  |  3.2 KB  |  153 lines  |  [TEXT/MPS ]

  1. {
  2. Created: Wednesday, June 27, 1990 at 6:42 PM
  3.     IntEnv.p
  4.     Pascal Interface to the Macintosh Libraries
  5.  
  6.         Copyright Apple Computer, Inc. 1989-1990, 1992
  7.         All rights reserved
  8. }
  9.  
  10.  
  11. {$IFC UNDEFINED UsingIncludes}
  12. {$SETC UsingIncludes := 0}
  13. {$ENDC}
  14.  
  15. {$IFC NOT UsingIncludes}
  16.     UNIT IntEnv;
  17.     INTERFACE
  18. {$ENDC}
  19.  
  20. {$IFC UNDEFINED UsingIntEnv AND UNDEFINED __INTENV__}
  21. {$SETC UsingIntEnv := 1}
  22. {$SETC __INTENV__ := 1}
  23.  
  24. {$I+}
  25. {$SETC IntEnvIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingPasLibIntf}
  28. {$I $$Shell(PInterfaces)PasLibIntf.p}
  29. {$ENDC}
  30.  
  31. {$IFC UNDEFINED __CONDITIONALMACROS__}
  32. {$I ConditionalMacros.p}
  33. {$ENDC}
  34.  
  35. {$SETC UsingIncludes := IntEnvIncludes}
  36.  
  37. {$ALIGN MAC68K}
  38.  
  39.     CONST
  40.  
  41.       { CMD words for IEfaccess(), from <fcntl.h> }
  42.       { IEfaccess command words for general usage in any program: }
  43.       
  44.       F_OPEN = $6400; { (('d'<<8)|00), d => "directory" ops }
  45.       F_DELETE = $6401;
  46.       F_RENAME = $6402;
  47.  
  48.       { IEfaccess command words for use only in MPW Tools: }
  49.       
  50.       F_GTABINFO = $6500; { (('e'<<8)|00), e => "editor" ops }
  51.       F_STABINFO = $6501;
  52.       F_GFONTINFO = $6502;
  53.       F_SFONTINFO = $6503;
  54.       F_GPRINTREC = $6504;
  55.       F_SPRINTREC = $6505;
  56.       F_GSELINFO = $6506;
  57.       F_SSELINFO = $6507;
  58.       F_GWININFO = $6508;
  59.       F_SWININFO = $6509;
  60.       F_GSCROLLINFO = $650A;
  61.       F_SSCROLLINFO = $650B;
  62.       F_GMARKER = $650D;
  63.       F_SMARKER = $650C;
  64.       F_GSAVEONCLOSE = $650F;
  65.       F_SSAVEONCLOSE = $650E;
  66.  
  67.       { Open modes for IEopen(), from <fcntl.h> }
  68.  
  69.       O_RDONLY = $0000;
  70.       O_WRONLY = $0001;
  71.       O_RDWR = $0002;
  72.       O_APPEND = $0008;
  73.       O_RSRC = $0010;
  74.       O_ALIAS = $0020;
  75.       O_CREAT = $0100;
  76.       O_TRUNC = $0200;
  77.       O_EXCL = $0400;
  78.       O_NRESOLVE = $4000;
  79.  
  80.       { IOCtl parameters }
  81.  
  82.       FIOINTERACTIVE = $6602; { (('f'<<8)|02), f => "open file" ops }
  83.       FIOBUFSIZE = $6603;
  84.       FIOFNAME = $6604;
  85.       FIOREFNUM = $6605;
  86.       FIOSETEOF = $6606;
  87.  
  88.     TYPE
  89.       IEString = STRING;
  90.       IEStringPtr = ^IEString;
  91.       IEStringVec = ARRAY [0..8191] OF IEStringPtr;
  92.       IEStringVecPtr = ^IEStringVec;
  93.       
  94.       { RECORD types used by IEfaccess: }
  95.       
  96.       SelectionRecord = RECORD
  97.           startingPos:    LONGINT;
  98.         endingPos:        LONGINT;
  99.         displayTop:        LONGINT;
  100.       END;
  101.       
  102.       MarkElement = RECORD
  103.           markStart:        LONGINT;
  104.         markEnd:        LONGINT;
  105.         charCount:        CHAR;
  106.         name:            ARRAY [0..65] OF CHAR;    { NOTE:  This is a C string! }
  107.       END;
  108.  
  109.       {$PUSH}
  110.       {$J+} { EXPORTed unit globals }
  111.  
  112.     VAR
  113.       ArgC: LONGINT;
  114.       ArgV: IEStringVecPtr;
  115.       _EnvP: IEStringVecPtr;
  116.  
  117.       Diagnostic: TEXT;
  118.       {$POP}
  119.  
  120. { The following definition has been moved to MacRuntime.p }
  121. {    FUNCTION IEStandAlone: BOOLEAN; }
  122.  
  123.     FUNCTION IEgetenv(envName: STRING; VAR envValue: UNIV IEString): BOOLEAN;
  124.  
  125.     FUNCTION IEfaccess(fName: STRING; opCode: LONGINT;
  126.                        arg: UNIV LONGINT): LONGINT;
  127.  
  128.     PROCEDURE IEopen(VAR fvar: UNIV PASCALFILE; fName: STRING; mode: LONGINT);
  129.  
  130.     FUNCTION IEioctl(VAR fvar: UNIV PASCALFILE; request: LONGINT;
  131.                      arg: UNIV LONGINT): LONGINT;
  132.  
  133.     FUNCTION IElseek(VAR fvar: UNIV PASCALFILE; offset: LONGINT;
  134.                      whence: LONGINT): LONGINT;
  135.  
  136.     PROCEDURE IEatexit(exitProc: UNIV LONGINT);
  137.       C;
  138.  
  139.     PROCEDURE IEexit(status: LONGINT);
  140.       C;
  141.  
  142.     PROCEDURE IE_exit(status: LONGINT);
  143.       C;
  144.  
  145. {$ALIGN RESET}
  146.  
  147. {$ENDC}    { UsingIntEnv }
  148.  
  149. {$IFC NOT UsingIncludes}
  150.     END.
  151. {$ENDC}
  152.  
  153.